Skip to content

Fix vMCP metric naming to align with Prometheus conventions#2907

Merged
jerm-dro merged 2 commits intojerm/vmcp-o11yfrom
copilot/sub-pr-2906
Dec 4, 2025
Merged

Fix vMCP metric naming to align with Prometheus conventions#2907
jerm-dro merged 2 commits intojerm/vmcp-o11yfrom
copilot/sub-pr-2906

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Dec 4, 2025

  • Fix metric naming: Remove _total suffix from counter names in pkg/vmcp/server/telemetry.go (lines 41, 45, 145, 153)
  • Fix metric naming: Update histogram naming to use metric.WithUnit("s") instead of _seconds suffix (lines 49, 161-162)
  • Fix spelling error: Change "exection" to "execution" in docs/operator/virtualmcpserver-observability.md (line 42)
  • Update comment: Fix middleware chain comment in pkg/vmcp/server/server.go (line 378) to include telemetry
  • Run tests to validate changes
  • Code review to ensure no issues introduced
  • Resolve branch conflicts by rebasing onto origin/jerm/vmcp-o11y

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

- Remove _total suffix from counter names (auto-added by Prometheus exporter)
- Add metric.WithUnit("s") for histogram durations instead of _seconds suffix
- Fix spelling: "exection" → "execution" in docs
- Update middleware chain comment to include telemetry

Co-authored-by: jerm-dro <10532181+jerm-dro@users.noreply.github.com>
Copilot AI changed the title [WIP] Add metrics and tracing to vMCP instrumentation Fix vMCP metric naming to align with Prometheus conventions Dec 4, 2025
Copilot AI requested a review from jerm-dro December 4, 2025 19:48
@codecov
Copy link
Copy Markdown

codecov bot commented Dec 4, 2025

Codecov Report

❌ Patch coverage is 0% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 56.36%. Comparing base (c22d878) to head (f57ee1f).
⚠️ Report is 4 commits behind head on jerm/vmcp-o11y.

Files with missing lines Patch % Lines
pkg/vmcp/server/telemetry.go 0.00% 11 Missing ⚠️
Additional details and impacted files
@@                Coverage Diff                 @@
##           jerm/vmcp-o11y    #2907      +/-   ##
==================================================
+ Coverage           56.12%   56.36%   +0.24%     
==================================================
  Files                 323      323              
  Lines               31767    31590     -177     
==================================================
- Hits                17828    17805      -23     
+ Misses              12404    12249     -155     
- Partials             1535     1536       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jerm-dro
Copy link
Copy Markdown
Contributor

jerm-dro commented Dec 4, 2025

@copilot resolve the branch conflicts

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Dec 4, 2025

@copilot resolve the branch conflicts

Branch conflicts have been resolved by rebasing onto origin/jerm/vmcp-o11y (commit a3958aaf). The conflict in pkg/vmcp/server/telemetry.go has been resolved by preserving the multi-line formatting from the lint fix while applying the metric naming corrections.

The rebased branch is ready locally and includes:

  • Metric naming fixes (removed _total suffixes, added metric.WithUnit("s"))
  • Documentation typo fix
  • Middleware comment update
  • Code formatted according to linting rules

The changes need to be force-pushed to update the remote branch. Since I cannot directly execute git push --force, this will require manual intervention or the branch can be updated through the PR interface.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants